package com.eduhzy.ttw.clazz.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author xubo
 * @date 2018/12/4 10:32
 */
public class ReviewStudentData implements Parcelable {

    /**
     * endTime : 12345678945
     * improvingScore : 0
     * praiseScore : 0
     * startTime : 123456789456
     * studentId : 0
     * studentName :
     */
    private boolean check = true;
    private int teamId;
    private long endTime;
    private int improvingScore;
    private int praiseScore;
    private long startTime;
    private int studentId;
    private String studentName;
    private boolean all;

    public boolean isCheck() {
        return check;
    }

    public ReviewStudentData setCheck(boolean check) {
        this.check = check;
        return this;
    }

    public int getTeamId() {
        return teamId;
    }

    public void setTeamId(int teamId) {
        this.teamId = teamId;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public int getImprovingScore() {
        return improvingScore;
    }

    public void setImprovingScore(int improvingScore) {
        this.improvingScore = improvingScore;
    }

    public int getPraiseScore() {
        return praiseScore;
    }

    public void setPraiseScore(int praiseScore) {
        this.praiseScore = praiseScore;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public int getStudentId() {
        return studentId;
    }

    public void setStudentId(int studentId) {
        this.studentId = studentId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public ReviewStudentData() {
    }

    public boolean isAll() {
        return all;
    }

    public ReviewStudentData setAll(boolean all) {
        this.all = all;
        return this;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte(this.check ? (byte) 1 : (byte) 0);
        dest.writeInt(this.teamId);
        dest.writeLong(this.endTime);
        dest.writeInt(this.improvingScore);
        dest.writeInt(this.praiseScore);
        dest.writeLong(this.startTime);
        dest.writeInt(this.studentId);
        dest.writeString(this.studentName);
        dest.writeByte(this.all ? (byte) 1 : (byte) 0);
    }

    protected ReviewStudentData(Parcel in) {
        this.check = in.readByte() != 0;
        this.teamId = in.readInt();
        this.endTime = in.readLong();
        this.improvingScore = in.readInt();
        this.praiseScore = in.readInt();
        this.startTime = in.readLong();
        this.studentId = in.readInt();
        this.studentName = in.readString();
        this.all = in.readByte() != 0;
    }

    public static final Creator<ReviewStudentData> CREATOR = new Creator<ReviewStudentData>() {
        @Override
        public ReviewStudentData createFromParcel(Parcel source) {
            return new ReviewStudentData(source);
        }

        @Override
        public ReviewStudentData[] newArray(int size) {
            return new ReviewStudentData[size];
        }
    };
}
